﻿using System;
using System.Collections.Generic;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002EF RID: 751
	public class THierarchical : TParseTreeNode
	{
		// Token: 0x170005E1 RID: 1505
		// (get) Token: 0x06001A65 RID: 6757 RVA: 0x0032DEB3 File Offset: 0x0032C0B3
		// (set) Token: 0x06001A66 RID: 6758 RVA: 0x0032DEBB File Offset: 0x0032C0BB
		public virtual List<TConnectByClause> ConnectByList
		{
			get
			{
				return this.connectByList;
			}
			set
			{
				this.connectByList = value;
			}
		}

		// Token: 0x170005E2 RID: 1506
		// (get) Token: 0x06001A68 RID: 6760 RVA: 0x0032DECD File Offset: 0x0032C0CD
		// (set) Token: 0x06001A67 RID: 6759 RVA: 0x0032DEC4 File Offset: 0x0032C0C4
		public virtual bool NoCycle
		{
			get
			{
				return this.noCycle;
			}
			set
			{
				this.noCycle = value;
			}
		}

		// Token: 0x170005E3 RID: 1507
		// (get) Token: 0x06001A69 RID: 6761 RVA: 0x0032DED5 File Offset: 0x0032C0D5
		// (set) Token: 0x06001A6A RID: 6762 RVA: 0x0032DEDD File Offset: 0x0032C0DD
		public virtual TExpression StartWithClause
		{
			get
			{
				return this.startWithClause;
			}
			set
			{
				this.startWithClause = value;
			}
		}

		// Token: 0x170005E4 RID: 1508
		// (get) Token: 0x06001A6B RID: 6763 RVA: 0x0032DEE6 File Offset: 0x0032C0E6
		// (set) Token: 0x06001A6C RID: 6764 RVA: 0x0032DF03 File Offset: 0x0032C103
		[Obsolete("ConnectByList")]
		public virtual TExpression ConnectByClause
		{
			get
			{
				if (this.ConnectByList == null)
				{
					return null;
				}
				return this.ConnectByList[0].Condition;
			}
			set
			{
				this.connectByClause = value;
			}
		}

		// Token: 0x06001A6D RID: 6765 RVA: 0x0032DF0C File Offset: 0x0032C10C
		public override void init(object arg1)
		{
			this.connectByList = (List<TConnectByClause>)arg1;
		}

		// Token: 0x06001A6E RID: 6766 RVA: 0x0032DF1A File Offset: 0x0032C11A
		public override void init(object arg1, object arg2)
		{
			this.init(arg1);
			this.startWithClause = (TExpression)arg2;
		}

		// Token: 0x06001A6F RID: 6767 RVA: 0x0032DF30 File Offset: 0x0032C130
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			if (this.connectByList != null)
			{
				foreach (TConnectByClause tconnectByClause in this.ConnectByList)
				{
					tconnectByClause.doParse(psql, plocation);
				}
			}
			if (this.startWithClause != null)
			{
				this.startWithClause.doParse(psql, plocation);
			}
		}

		// Token: 0x06001A70 RID: 6768 RVA: 0x0032DFA0 File Offset: 0x0032C1A0
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06001A71 RID: 6769 RVA: 0x0032DFB0 File Offset: 0x0032C1B0
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.connectByList != null)
			{
				for (int i = 0; i < this.connectByList.Count; i++)
				{
					this.connectByList[i].acceptChildren(v);
				}
			}
			if (this.startWithClause != null)
			{
				this.startWithClause.acceptChildren(v);
			}
			v.postVisit(this);
		}

		// Token: 0x0400199B RID: 6555
		private List<TConnectByClause> connectByList;

		// Token: 0x0400199C RID: 6556
		private bool noCycle;

		// Token: 0x0400199D RID: 6557
		private TExpression connectByClause;

		// Token: 0x0400199E RID: 6558
		private TExpression startWithClause;
	}
}
